Skip to content

Conversation

@jif-oai
Copy link
Collaborator

@jif-oai jif-oai commented Jan 6, 2026

No description provided.

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 10f96c1acc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jif-oai
Copy link
Collaborator Author

jif-oai commented Jan 7, 2026

@codex review

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bb9726a3c3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# Conflicts:
#	codex-rs/core/src/unified_exec/process_manager.rs
@@ -0,0 +1,200 @@
use std::collections::HashMap;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nice to rebase shell_command on top of this

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! In the end I think it will allow us to keep only unified_exec

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is lots of logic in /Users/pakrym/code/codex/codex-rs/core/src/exec.rs that I'm afraid we'll rediscover again with a separate implementation


#[cfg(unix)]
fn kill_process(pid: u32) -> io::Result<()> {
let result = unsafe { libc::kill(pid as libc::pid_t, libc::SIGKILL) };
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have an entire thing to kill trees of child processes in shell_command

Copy link
Collaborator

@pakrym-oai pakrym-oai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of starting with a completely new pipe implementation can we reuse/extend/share the one we have for shell_command?

@jif-oai
Copy link
Collaborator Author

jif-oai commented Jan 14, 2026

@codex review

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 556137528e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +162 to +166
let reader_handle = tokio::spawn(async move {
if let Some(handle) = stdout_handle {
let _ = handle.await;
}
if let Some(handle) = stderr_handle {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Ensure pipe reader tasks are cancelled on terminate

The stdout/stderr reader tasks spawned here are only awaited by reader_handle, but ProcessHandle::terminate (and Drop) only aborts that one handle; the actual stdout/stderr tasks are not stored anywhere. If a child process is terminated while a grandchild keeps stdout/stderr open, those reader tasks will keep running indefinitely, leaking tasks and continuing to read from the pipes. Consider storing those JoinHandles (or wiring a cancellation token/timeout) so terminate() can abort the actual reader tasks.

Useful? React with 👍 / 👎.

@jif-oai
Copy link
Collaborator Author

jif-oai commented Jan 14, 2026

@codex review

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

ToolSpec::Function(ResponsesApiTool {
name: "exec_command".to_string(),
description:
"Runs a command in a PTY, returning output or a session ID for ongoing interaction."
.to_string(),

P2 Badge Update exec_command description to match pipe default

The tool spec still says exec_command “Runs a command in a PTY”, but this commit changes the default to pipe mode unless tty=true. Clients (including the model) often rely on the top‑level description rather than per‑field docs, so they may omit tty and end up running commands that require a TTY (e.g., interactive prompts, isatty‑gated behavior) in non‑TTY mode, causing hangs or different output. Consider updating the description to reflect the new default and the tty flag.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jif-oai jif-oai enabled auto-merge (squash) January 14, 2026 16:46
@jif-oai jif-oai disabled auto-merge January 14, 2026 17:49
@jif-oai jif-oai merged commit 577e1fd into main Jan 14, 2026
32 checks passed
@jif-oai jif-oai deleted the jif/piped-process branch January 14, 2026 18:44
@github-actions github-actions bot locked and limited conversation to collaborators Jan 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants